import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/nUser/login',
    method: 'post',
    data
  })
}

export function getInfo(data) {
  return request({
    url: '/nUser/getInfo/'+data,
    method: 'post',
  })
}

export function logout(data) {
  return request({
    url: '/nUser/logout/'+data,
    method: 'post'
  })
}

export function findById(id) {
  return request({
    url: '/nUser/findById/' + id,
    method: 'get'
  })
}

export function updateUser(data) {
  return request({
    url: '/nUser/update/',
    method: 'post',
    data
  })
}

export function updateUserPassword(data) {
  return request({
    url: '/nUser/updatePassword',
    method: 'post',
    data
  })
}

export function uploadPicture(data) {
  return request({
    url: '/nUser/updateHeadImgWeb/',
    method: 'post',
    data
  })
}


export function showAllCollects(userId) {
  return request({
    url: '/nUser/showAllCollects/' + userId,
    method: 'get',
  })
}

export function showTypesCollects(data) {
  return request({
    url: '/nUser/showOthersCollects',
    method: 'post',
    data
  })
}




